<style>
    .footer-home{display: none;}
    .clear{ clear:both}
    .adress2{position: relative;
        border-bottom: 1px solid #c5c5c5;
        margin-bottom: .5rem;
        background: #fff;}
    .receiving2{    width: 94%;
        padding:5% 5% 5% 5%;
        margin: 0 3%;
        font-size: 1.5rem;
        font-weight: 500;
        box-sizing: border-box;
        border: solid 1px #FFF;
        padding-left: 10px;
    }
    .more2{position: absolute;
        right: 2%;
        top: 37%;
        width: 1.2rem;}
    .location2{    width: 1.2rem;
        position: absolute;
        left: 2%;
        top: 35%;
    }}
</style>
<div id="orderDetails">
    <div class="heading">
        <a href="#"><img src="resource/images/img-17-8.jpg" /></a>
        订单详情
    </div>
   <?php if($output['order_info']['type']==0) {?>
    <div class="adress" >
        <!--<img class="location" src="resource/images/img-16-2.png" />-->
        <div class="receiving">
            <div class="contacts">收货人：<?php echo $output['order_info']['cnee_name'] ?></div>
            <div class="tel"><?php echo $output['order_info']['cnee_tel'] ?></div>
            <div class="address"><?php echo $output['order_info']['address_name'] ?></div>
            <div class="clear"></div>
        </div>
        <!--<img class="more" src="resource/images/img-17-7.png" />-->
    </div>
  <?php } else{ ?>
    <div class="adress2">
       <!-- <img class="location2" src="resource/images/img-16-2.png" />-->
        <div class="receiving2">
            <div class="contacts">收货人：<?php echo $output['order_info']['cnee_name'] ?></div>
            <div class="tel"><?php echo $output['order_info']['cnee_tel'] ?></div>
            <div class="clear"></div>
        </div>
        <!--<img class="more2" src="resource/images/img-17-7.png" />-->
    </div>
    <?php } ?>
    <div class="order">
        <p>订单编号：<?php echo $output['order_info']['bg_order_sn']; ?></p>
        <?php if($output['order_info']['type']==1) {?>
        <p>商品兑换码：<?php echo $output['order_info']['bg_order_code']; ?> <?php if($output['order_info']['bg_order_status']=='21'){ ?><span>(已核销)</span><?php } ?></p>
        <?php }?>
        <div class="commodity">
            <p style="line-height: 1.5rem;"><?php echo $output['order_info']['bg_title']; ?></p>
            <p class="price">
                <span>￥<?php echo $output['order_info']['bg_order_price']; ?></span>
                <span class="through">￥<?php echo $output['order_info']['bg_price']; ?></span>
                <span>x1</span>
            </p>

            <img src="<?php echo getbargain_img($output['order_info']['bg_thumb']) ?>" />
        </div>

        <p>实付金额： <span>￥<?php echo $output['order_info']['bg_order_price']; ?></span>  </p>
        <p>砍减： <span>￥<?php echo $output['cuont_sunm']; ?></span>  </p>
        <p>代付： <span>￥<?php echo $output['paid_sunm']; ?></span>  </p>

        <div class="details">
            <p>订单编号：  <?php echo $output['order_info']['bg_order_sn']; ?> </p>
            <p>创建时间：  <?php echo date('Y-m-d H:i:s',$output['order_info']['add_time']);?></p>
            <p>付款时间：  <?php echo date('Y-m-d H:i:s',$output['order_info']['pay_time']);?></p>
            <?php if($output['order_info']['bg_order_status'] == 40 || $output['order_info']['bg_order_status']==41) {?>
            <p>物流单号：  <?php echo $output['order_info']['logistics_no']; ?>(<?php echo $output['order_info']['dhl']; ?>) </p>
            <p>发货时间：  <?php echo date('Y-m-d H:i:s',$output['order_info']['logistics_time']);?></p>
             <?php if($output['order_info']['bg_order_status']==41) {?>
            <p>发货时间：  <?php echo date('Y-m-d H:i:s',$output['order_info']['receiving_time']);?></p>
             <?php }?>
            <?php } ?>
        </div>
    </div>
    <div class="total">
        <p>总金额 :  <span>￥<?php echo $output['order_info']['bg_order_price']; ?></span> </p>
        <?php if ($output['order_info']['bg_order_status'] == 40){?>
        <a href="###" class="ack">确认收货</a>
        <?php } ?>
    </div>


</div>
<script>
 $(".ack").click(function(){
     if(confirm("是否确认收货?")){
         $.post('index.php?act=bargain_order&op=ackReceiving',{order_id:<?php echo $output['order_info']['bg_order_id'] ?>},function(ret){

             if(ret.datas){
                 popAlert('确认收货成功', function(){location.reload();})
             }else{
                 popAlert('系统出错，请重试！')
             }



         },'json');

     }
 });


</script>
